package cn.stylefeng.guns.modular.business.frequency.ordermodifydetail.entity;

import cn.stylefeng.guns.core.pojo.base.entity.BaseEntity;
import com.baomidou.mybatisplus.annotation.*;

import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 订单修改记录明细表
 *
 * @author yujie
 * @date 2023/05/09 17:16
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("tt_order_modify_detail")
public class OrderModifyDetail extends BaseEntity {

    /**
     * ID
     */
    @TableId("id")
    private Long id;

    /**
     * order_id
     */
    @TableField("order_id")
    private Long orderId;

    /**
     * transport_id
     */
    @TableField("transport_id")
    private Long transportId;

    /**
     * 修改的字段名称
     */
    @TableField("`column`")
    private String column;

    /**
     * 修改的字段描述
     */
    @TableField("column_desc")
    private String columnDesc;

    /**
     * 修改后的值
     */
    @TableField("`value`")
    private String value;

    /**
     * 修改前的值
     */
    @TableField("old_value")
    private String oldValue;

    /**
     * 备注
     */
    @TableField("remark")
    private String remark;


    @TableField(exist = false)
    private String createUserName;

    /**
     * 租户ID
     */
    @TableField(value = "tenant_id",fill = FieldFill.INSERT)
    private Long tenantId;

    public OrderModifyDetail(Long orderId, Long transportId, String column, String columnDesc, String value, String oldValue, Long tenantId) {
        this.orderId = orderId;
        this.transportId = transportId;
        this.column = column;
        this.columnDesc = columnDesc;
        this.value = value;
        this.oldValue = oldValue;
        this.tenantId = tenantId;
    }

    public OrderModifyDetail(Long orderId, Long transportId, String column, String columnDesc, String value, String oldValue, Long tenantId, String remark) {
        this.orderId = orderId;
        this.transportId = transportId;
        this.column = column;
        this.columnDesc = columnDesc;
        this.value = value;
        this.oldValue = oldValue;
        this.tenantId = tenantId;
        this.remark = remark;
    }

    public OrderModifyDetail() {
    }
}
